<?php
	class CursosController extends AppController {
		var $name = 'Cursos';
		var $helpers = array('Time');

		function view($id = null) {
			if(!$id) {
				$this -> Session -> setFlash(__('Curso Inválido', true));
				$this->redirect($this->referer(array('controller'=>'usuario','action' => 'logout')));
			}
			$this -> set('curso', $this -> Curso -> read(null, $id));
			// $this -> Curso -> id = $id;
			// $this -> set('clases', $this -> Curso -> find());
		}
		
		function profesor_view($id = null) {
			if(!$id) {
				$this -> Session -> setFlash(__('Curso Inválido', true));
				$this->redirect($this->referer(array('controller'=>'usuario','action' => 'logout')));
			}
			$this -> set('curso', $this -> Curso -> read(null, $id));
			// $this -> Curso -> id = $id;
			// $this -> set('clases', $this -> Curso -> find());
		}

	}
?>